﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DbAdapter.sqldbAdapter;

namespace DAO.WaiGaoQiao
{
    public class DataAccessDeptManagement
    {
        /// <summary>
        /// 获取所有部门根节点
        /// </summary>
        /// <returns></returns>
        public DataSet SelDeptInfo()
        {
            sqldb db = new sqldb();
            string query = "select * from DeptView";
            return db.ExecuteDataset(GetConntionString.conntionstring(), CommandType.Text, query);
        }

        /// <summary>
        /// 获取所有部门子节点
        /// </summary>
        /// <returns></returns>
        public DataSet SelDeptChildInfo()
        {
            sqldb db = new sqldb();
            string query = "select * from GroupView";
            return db.ExecuteDataset(GetConntionString.conntionstring(), CommandType.Text, query);
        }
    }
}
